<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>管理员</title>
</head>
<body         background="11.png">
<center>试题管理</center>
<h3 align="right"><a href="../admin/index.php?c=index&m=index">返回</a></h3>
<h2 align="left"><a href="index.php?c=index&m=addTest">添加试题</a></h2>
<!-- 通过SID搜索-->
<form method="post" action="index.php?c=index&m=searchtest" enctype="multipart/form-data">
<h2>请输入试题类型</h2>
<input type="search" name="pname">
<input type="submit" value="搜索">
</form>
<table align="center" border="1">
	<tr>
		<th>试题编号</th>
		<th>问题</th>
		<th>分数</th>
		<th>图片一</th>
		<th>答案一</th>
		<th>图片二</th>
		<th>答案二</th>
		<th>图片三</th>
		<th>答案三</th>
		<th>图片四</th>
		<th>答案四</th>
		<th>正确答案</th>
		<th>类型</th>
		<th>操作</th>
	</tr>
	<?php 
		foreach($data['test'] as $row)
		{
			echo '<tr>';
			echo '<th>'.$row['tid'].'</th>';
			echo '<th>'.$row['content'].'</th>';
			echo '<th>'.$row['score'].'</th>';
			
			echo '<th align="center"><img src="../images/'.$row['pic1'].'" width=60 height=80 alt="无头像"></th>';
			echo '<th>'.$row['op1'].'</th>';
			
			echo '<th align="center"><img src="../images/'.$row['pic2'].'" width=60 height=80 alt="无头像"></th>';
			echo '<th>'.$row['op2'].'</th>';
			
			echo '<th align="center"><img src="../images/'.$row['pic3'].'" width=60 height=80 alt="无头像"></th>';
			echo '<th>'.$row['op3'].'</th>';
			
			echo '<th align="center"><img src="../images/'.$row['pic4'].'" width=60 height=80 alt="无头像"></th>';
			echo '<th>'.$row['op4'].'</th>';
			echo '<th>'.$row['ans'].'</th>';
			echo '<th>'.$row['pid'].'</th>';
			echo '<th><a href="index.php?c=index&m=testEditForm&tid='.$row['tid'].'">修改</a>|<a href="index.php?c=index&m=testDelete&tid='.$row['tid'].'"onClick="return confirm(\'确定要删除吗？\');">删除</a></th>';
			echo '</tr>';

		}

	 ?>
	
</table>
</body>
</html>